//
//  SPHomeBestSellersCollectionViewCell.m
//  ShopProject
//
//  Created by 颜魏 on 2018/11/27.
//  Copyright © 2018年 KB. All rights reserved.
//

#import "SPHomeBestSellersCollectionViewCell.h"
#import "SPProductModel.h"

@interface SPHomeBestSellersCollectionViewCell()

@property (weak, nonatomic) IBOutlet UIImageView *iconIv;
@property (weak, nonatomic) IBOutlet UILabel *nameLabel;
@property (weak, nonatomic) IBOutlet UILabel *priceLabel;
@property (weak, nonatomic) IBOutlet UIView *contentBgView;
@property (weak, nonatomic) IBOutlet UILabel *countLabel;

@end

@implementation SPHomeBestSellersCollectionViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
    
    self.contentBgView.layer.borderWidth = 0.8;
    self.contentBgView.layer.borderColor = RGBCOLOR(240, 240, 240).CGColor;
}

#pragma mark - get set
- (void)setProduct:(SPProductModel *)product {
    _product = product;
    [self.iconIv yy_setImageWithURL:[NSURL URLWithString:product.productIconUrl] placeholder:kProductPlaceholderIconImage];
    self.nameLabel.text = product.productName;
    self.priceLabel.text = [NSString stringWithFormat:@"￥%@", product.productPrice];
    self.countLabel.text = [NSString stringWithFormat:@"%@人出价", product.productAuctionCount];
}


@end
